package com.liu.controller;

import com.liu.entity.Tickets;
import com.liu.service.intf.FoodsService;
import com.liu.service.intf.TicketsService;
import com.liu.vo.R;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin
@RequestMapping("/api/tickets/")
@Api(value = "实现门票相关操作",tags = "实现门票相关操作")
public class TicketsController {
    @Autowired
    private TicketsService service;
    @GetMapping("list.do")
    public R selectlist(){
        return service.querylist();
    }
    @GetMapping("detail.do")
    public R detail(int id){
        return service.queryDeatil(id);
    }
    @PostMapping("save.do")
    public R save(@RequestBody Tickets tickets){
        return service.save(tickets);
    }
}
